package ${project.packageName}.${project.moduleName}.domain.${tableStructure.className};

import com.rabbitpre.tubit.ddd.Entity;

import java.util.Date;

/**
 * ${tableStructure.tableComment}实体
 *
 * @author ${developer.author}
 * @date ${developer.datetime}
 */
public class ${tableStructure.classNameUppercase}Entity implements Entity<${project.packageName}.${project.moduleName}.domain.music.${tableStructure.classNameUppercase}Entity> {

    private static final long serialVersionUID = 1L;

<#list tableStructure.tableFields as x>
    /**
     * ${x.fieldComment}
     */
    private ${x.attrType} ${x.attrName};
</#list>

    @Override
    public boolean sameIdentityAs(${project.packageName}.${project.moduleName}.domain.${tableStructure.className}.${tableStructure.classNameUppercase}Entity ${tableStructure.classNameUppercase}Entity) {
        return ${tableStructure.classNameUppercase}Entity != null && this.getId().equals(${tableStructure.classNameUppercase}Entity.getId());
    }

<#list tableStructure.tableFields as x>
    public ${x.attrType} get${x.attrNameUppercase}() {
        return ${x.attrName};
    }

    public void set${x.attrNameUppercase}(${x.attrType}  ${x.attrName}) {
        this.${x.attrName} = ${x.attrName};
    }
</#list>
}
